﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using DBUtility;
using IDAL.RF.ATETest;

namespace DAL.RF.ATETest
{
    public class TestItem_fancha_85E : ITestItem_fancha_85E
    {
        #region  字段定义
        private const string PARM_TESTITEM_PRODUCTSN = "@ProductSN";
        private const string PARM_TESTITEM_ISDEBUGATE = "@Is_DebugATE";
        #endregion

        public string TestItem_fanchajiexian_85E(string productSN, bool is_DebugATE)
        {
            SqlParameter[] testParms = GetParameters();
            //Bind the parameter
            testParms[0].Value = productSN;
            testParms[1].Value = is_DebugATE;

            string str = Convert.ToString(sqlHelper.ExecuteScalar(sqlHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, "TestItem_fancha_for85E", testParms));
            return str;
        }

        private static SqlParameter[] GetParameters()
        {
            SqlParameter[] parms = null;
            parms = new SqlParameter[]
                {
                    new SqlParameter(PARM_TESTITEM_PRODUCTSN,SqlDbType.NVarChar,50),
					new SqlParameter(PARM_TESTITEM_ISDEBUGATE,SqlDbType.Bit,1)
                };
            return parms;
        }
    }
}
